Skip to content

feat: add getMappings method to QualifiedNameLookup#1228

Merged
ava-fred merged 1 commit into
dsldevkit:masterfrom
ava-fred:work.251117
Nov 27, 2025
Merged

feat: add getMappings method to QualifiedNameLookup#1228
ava-fred merged 1 commit into
dsldevkit:masterfrom
ava-fred:work.251117

Conversation

@ava-fred
Copy link
Copy Markdown
Collaborator

As per title.

}
}
if (ArrayUtils.find(values, value) >= 0) {
List<String> l = new ArrayList<>();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
List<String> l = new ArrayList<>();
List<String> l = new ArrayList<>(1);

}

List<List<String>> mappings = root.getMappings(value);
List<QualifiedName> result = new ArrayList<>();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
List<QualifiedName> result = new ArrayList<>();
List<QualifiedName> result = new ArrayList<>(mappings.size());

if (children != null) {
for (SegmentNode node : children) {
List<List<String>> childResult = node.getMappings(value);
for (List<String> mapping : childResult) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (List<String> mapping : childResult) {
for (List<String> mapping : node.getMappings(value)) {

and remove the local variable?

@ava-fred ava-fred merged commit 7aea68b into dsldevkit:master Nov 27, 2025
2 checks passed
@ava-fred ava-fred deleted the work.251117 branch November 27, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants